package com.tan.common.enums;

import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Tan
 * @description
 * @date 2025/1/27
 */
@Getter
@AllArgsConstructor
public enum VisibleEnum {

    /**
     *
     */
    DISPLAY("显示", 1),

    HIDDEN("隐藏", 0);

    private final String title;
    private final Integer code;

    public static boolean eq(VisibleEnum msg, Integer code) {
        return ObjectUtil.equal(msg.getCode(), code);
    }

    public boolean eq(Integer code) {
        return ObjectUtil.equal(this.code, code);
    }
}
